﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace DeleteAllFiles
{
    class Program
    {
        static void Main(string[] args)
        {            
            string[] filePaths = Directory.GetFiles(@"C:\Program Files (x86)\hMailServer\Data", "*.eml");
            foreach (string filePath in filePaths)
            {
                FileInfo fi = new FileInfo(filePath);
                if (fi.LastAccessTime < DateTime.Parse("24/02/2014"))
                {
                    Console.WriteLine(filePath.ToString());
                    File.Delete(filePath);
                }                                
            }           
        }
    }
}
